import request from '@/utils/request'

// 查询试题库分页
export function pageItembank(query) {
  return request({
    url: '/edu/itembank/page',
    method: 'get',
    params: query,
    factoryId:true,
  })
}

// 查询试题库列表
export function listItembank(query) {
  return request({
    url: '/edu/itembank/list',
    method: 'get',
    params: query,
    factoryId:true
  })
}

// 查询试题库详细
export function getItembank(id) {
  return request({
    url: '/edu/itembank/info/' + id,
    method: 'get'
  })
}

// 新增试题库
export function addItembank(data) {
  return request({
    url: '/edu/itembank',
    method: 'post',
    data: data,
    factoryId:true,
  })
}

// 修改试题库
export function updateItembank(data) {
  return request({
    url: '/edu/itembank',
    method: 'put',
    data: data
  })
}

// 删除试题库
export function delItembank(data) {
  return request({
    url: '/edu/itembank/remove/batch',
    method: 'delete',
    data
  })
}

// 导出试题库
export function exportItembank(query) {
  return request({
    url: '/edu/itembank/export',
    method: 'get',
    params: query
  })
}

// 下载模板试题库
export function downImportTemplate() {
  return request({
    url: '/edu/itembank/importTemplate',
    method: 'get'
  })
}
